<include file="Public/min-header"/>

<script src="__ROOT__/Public/js/jquery.js"></script>
<script src="__ROOT__/Public/js/imgUp.js"></script>
<link href="__ROOT__/Public/css/lyz.calendar.css" rel="stylesheet" type="text/css" />
<script src="__ROOT__/Public/js/lyz.calendar.min.js" type="text/javascript"></script>
<link href="__ROOT__/Public/css/reset.css" rel="stylesheet">
<link href="__ROOT__/Public/css/comment.css" rel="stylesheet">
<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
        
                <a href="{:U('Goods/goodsList',array('goods_state'=>1,'is_back'=>1))}" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>

            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i>虚拟评价</h3>
                </div>
                <div class="panel-body">
                    <!--表单数据-->
                    <form method="post" id="addEditGoodsForm" enctype="multipart/form-data">
                    <!--通用信息-->
                        <div class="mainbody">
                            <div class="conbox conbox1">
                                <p class="conp"><i><img src="__ROOT__/Public/images/comment/xinghao.png"></i>日期</p>
                                <input id="txtEndDate" name="add_time" placeholder="选择日期" style="width:180px;line-height: 32px;border:1px solid #eee;padding: 0 10px;" />
                            </div>
                            <div class="conbox">
                                <p class="conp"><i><img src="__ROOT__/Public/images/comment/xinghao.png"></i>评价</p>
                                <textarea placeholder="商品是否给力，快来分享一下您的购物心得吧~" id="area" name="content" ></textarea>
                            </div>
                            <div class="conbox">
                                <p class="conp"><i></i>晒单</p>
                                <div class="img-box full">
                                    <section class=" img-section">
                                        <div class="z_photo upimg-div clear" >
                                            <section class="z_file fl">
                                                <img src="__ROOT__/Public/images/comment/a11.png" class="add-img">
                                                <input type="file" name="file" id="file" class="file" value="" accept="image/jpg,image/jpeg,image/png,image/bmp" multiple />
                                            </section>
                                        </div>
                                    </section>
                                    <div class="clearfix"></div>
                                </div>
                                <p style="color: #999;padding: 10px 0;font-size: 12px;">最多可选择5张图片，每张不超过5M，支持格式jpg、jpeg、bmp、png</p>
                            </div>
                        </div>
                        <aside class="mask works-mask">
                            <div class="mask-content">
                                <p class="del-p ">确定删除该图片吗？</p>
                                <p class="check-p"><span class="del-com wsdel-ok">确定</span><span class="wsdel-no">取消</span></p>
                            </div>
                        </aside>


                        <script>

                            $(function () {

                                $("#txtEndDate").calendar();

                            });

                        </script>

                        <div class="pull-right">
                        <input type="hidden" name="goods_id" value="{$goods_id}">
                        <input type="hidden" name="img" id="img"  value="">
                        <button class="btn btn-primary" onclick="submit_form();" title="" data-toggle="tooltip" type="button" data-original-title="保存">保存</button>
                    </div>
			    </form><!--表单数据-->
                </div>
            </div>
        </div>    <!-- /.content -->
    </section>
</div>

</body>
</html>
<script>
   function submit_form() {
       $.ajax({
           type : 'post',
           url : "{:U('Goods/virtual_comment?is_ajax=1')}",
           data : $("#addEditGoodsForm").serialize(),// 你的formid
           dataType : 'json',
           success : function(data){
               var data =  eval('('+data+')');
               if(data.status == 1){
                   alert("添加成功");
                   setTimeout(function(){
                       window.location.reload();
                   },1000)
               }
           }
       })
   }

</script>